const msg={
    NOT_LOGIN:"用户没有登录",
    NOT_ROLE:"用户没有创建角色"
}


const code={
    SUCCESS:200,
    ERROR:500,

    ERROR_NOT_ROLE:1000,
    ERROR_LIST_NOT_ROLE:1001,
}

function result(code,msg,data=null){
    return {code:code,msg:msg,data:data};
}

function success(msg='成功',data=null){
    return {code:code.SUCCESS,msg:msg,data:data};
}

function error(code=500,msg="服务器出错"){
    return {code:code,msg:msg};
}


export default{
    result,success,error,code,msg
}